package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.MenuEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MenuMapper extends BaseMapper<MenuEntity> {
    @Select("select * from menu where parent_id = #{parentId}")
    List<MenuEntity> selectByParentId(@Param("parentId") Integer parentId);
    @Select("select * from menu where parent_id is null ")
    List<MenuEntity> selectOneList();


}
